home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d22 / hdtest.arc / HDTEST.DOC < prev    next >
Encoding:
Text File  |  1989-01-18  |  102.6 KB  |  1,964 lines

  1.           
  2.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  3.           
  4.           
  5.                                   USER-SUPPORTED SOFTWARE                                  _______________________
  6.           
  7.           Much of the software which is available for your computer seems to
  8.           have been produced and sold on the assumption that you are a crook, and
  9.           that you will take any available opportunity to cheat its creators and
  10.           vendors out of their rightful reward. Such software is copy-protected
  11.           within an inch of its (and your computer's) life, and is still priced
  12.           at a level which guarantees its producers a profit even if four or
  13.           five illegal copies are made for each one sold. User-supported
  14.           software, increasingly known as "Shareware" is different. You may have
  15.           got a copy of this package free from a friend or a bulletin board or
  16.           (for a nominal fee) from a users' group or software library. In any
  17.           case, you have in your possession a perfectly legal copy of the
  18.           program. You are further encouraged to make as many copies of the
  19.           package as you like and to distribute them to all your friends and
  20.           acquaintances. However, if, after trying the program out, you find                         ________                                           
  21.           that it is useful and want to keep it and continue using it, you must                                                                           ____
  22.           register your copy by sending the registration fee ($35.00,) together
  23.           with a completed registration form, to the address on the form. If you
  24.           continue to use the program after an appropriate trial period (and the
  25.           "Shareware" system lets you determine what is appropriate), you are                                  ___                                        
  26.           breaking both the terms of the license under which you have received
  27.           the software and the law. You may believe that the chances of the law
  28.           of Copyright being enforced against you are very low (and you may even
  29.           be right!), and the distributors of "user-supported" software do, in
  30.           fact, usually simply have to trust you to be honest and willing to pay
  31.           a reasonable price for a useful program. However, you should bear in
  32.           mind that unsupported "Shareware" software is likely either to cease
  33.           to exist altogether or to go commercial. The former eventuality
  34.           benefits nobody - the latter only the "middlemen". As an additional
  35.           inducement, Registered users will get a copy of the latest version of
  36.           HDTEST, which already (at the time of writing) includes a number of
  37.           significant enhancements over V4.45, and they will be entitled to
  38.           support and help with HDTEST-related problems (including telephone
  39.           support) for a year from the date of Registration. Additional features
  40.           in V4.71 of HDTEST included support for a still wider variety of
  41.           computer systems and storage media, full DOS 4.0 support, and the
  42.           removal of the ANSI.SYS requirement for the screen display to work
  43.           properly.
  44.           
  45.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  46.           
  47.           
  48.           
  49.                                        INTRODUCTION                                       ____________
  50.           
  51.           HDTEST was originally written to allow comprehensive Read/Write
  52.           testing of hard disks on IBM PCs, XTs, ATs, and "true" compatibles.
  53.           The V4.10 release relaxed many of the hardware restrictions imposed by
  54.           earlier (V2.xx and V3.xx) versions of the program and made it useful
  55.           for testing most MS-DOS-compatible storage devices currently in use on
  56.           IBM-compatible computers, including removable (floppy and hard) disks
  57.           and logically partitioned hard disks. This release (V4.45) includes
  58.           BIOS-level support for DOS 3.3 "extended devices" and more options for
  59.           the handling of totally unreadable sectors, and recognizes (but does
  60.           not support) large (> 32 Mb) devices under IBM DOS 4.0 and Compaq DOS
  61.           3.31. Although many programs, including IBM's diagnostics, allow
  62.           "surface scanning" and seek testing of hard disks, none that are
  63.           available to the average user test whether the whole disk can retain
  64.           the data that is or will be written to it. HDTEST's principal "claim
  65.           to fame" is the ability thoroughly to test the magnetic media in a
  66.           device which contains data while preserving the data (although data                                     _________________________               
  67.           loss is unavoidable if an area which is in use has become unreadable).                                                                      ____      
  68.           HDTEST tests the disk much more thoroughly than programs such as
  69.           DFixer, Mace, and Norton's DT. Mace and DT, like many public domain
  70.           "disk test" programs, simply read every cluster on the disk and report
  71.           on any errors encountered.  DFixer does better, writing 4 test
  72.           patterns to every free cluster and checking that they can be read back
  73.           correctly, but it makes no attempt to test clusters that are already
  74.           in use - the very ones which contain your precious data!
  75.           
  76.           In addition to its testing function, HDTEST has been reported to be
  77.           useful as an automatic disk repair utility for both hard and floppy
  78.           disks which have developed (especially) intermittent or persistent
  79.           read errors, preventing or impeding their normal use. Although HDTEST
  80.           cannot read the totally unreadable, it tries much harder that DOS does
  81.           and will almost always, in the course of its operation, allow you to
  82.           recover the entire readable portion(s) of a file with one or more                             ________                                      
  83.           unreadable clusters in it, optionally either remapping all of what it
  84.           reads from the disk or replacing bad sectors (the default) or clusters
  85.           with NULLs. HDTEST is not an alternative to backing up your floppies                                ___                                           
  86.           and/or hard disk - it may sometimes be able to save your neck when you                                    _________                                   
  87.           forget or your backup goes bad too! On hard disks which have developed
  88.           intermittent read errors, running HDTEST can sometimes totally cure                                                   ___                       
  89.           the problem, presumably because the "flaky" sectors get rewritten and
  90.           the minor misalignments and/or weakening of the magnetic "image" which
  91.           were causing the trouble are corrected when the data is rewritten.
  92.           
  93.           In its normal ("slow") mode, HDTEST writes 20 different test patterns
  94.           to every cluster on the disk and checks that each pattern can be read             _____                                                             
  95.           back correctly, while preserving (and eventually restoring) the
  96.           contents of the clusters that contain data.  HDTEST can even (on many
  97.           devices) detect hard disk errors which are minor enough to be
  98.           correctable (and corrected) by the disk controller's own "error-
  99.           correcting code" (ECC).  These errors are normally totally invisible
  100.           to programs running under DOS and will not usually be picked up by
  101.           other disk test utilities.  They may, however, be early signs of
  102.           problems that will become significant later, and HDTEST consequently
  103.           marks these clusters, too, as bad. As long as HDTEST can read the data
  104.           from a flaky cluster correctly once (and it tries quite hard) it will
  105.           
  106.           
  107.                                           Page 2                                
  108.           
  109.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  110.           
  111.           
  112.           be able to save the file of which that cluster is a part intact, while                                                                   ______       
  113.           marking the cluster so that DOS does not try to use it again. The
  114.           program was designed to minimize the likelihood of user error causing
  115.           data loss on a good (or slightly bad) disk, and to be easy to use - it
  116.           could not be made very fast, since multiple bit patterns have to be
  117.           written to and read from each cluster, and this takes a significant
  118.           time even on a fast hard disk. This version does, however, have a less
  119.           sensitive "fast" test mode, which writes only two test patterns to
  120.           each block and is recommended for use when testing/repairing floppy
  121.           disks and/or to correct intermittent problems or rule out gross
  122.           problems on a hard disk.
  123.           
  124.           The program can be used to test/repair single and double-sided 8- and
  125.           9-sector minifloppies (if you have plenty of patience!), as well as                                             ______                          
  126.           AT-format 1.2Mb minifloppies, 8" standard floppies, and 3.5"
  127.           microfloppies (with the same proviso regarding a need for patience).
  128.           
  129.           HDTEST's companion program, HDCHEK, simply examines the logical
  130.           structure of the system and target device and gives a short report on
  131.           what it finds. It does not write to the disk, and is provided                                 ___                                   
  132.           principally to allow a quick and easy, but fairly reliable, check for
  133.           compatibility between HDTEST and a given software/hardware
  134.           configuration. As part of its report, HDCHEK notes at what level (DOS
  135.           interrupts only, INT 13, or direct entry to the BIOS) it was able to
  136.           access the target device, which has a bearing on HDTEST's ability to
  137.           detect certain types of errors. In general, if HDCHEK runs                                          __________                
  138.           successfully on a system and target device, then HDTEST can be
  139.           expected to do so, although the latter program does require more
  140.           memory.
  141.           
  142.           The HDTEST package is distributed as "User-supported Software". If you
  143.           intend to continue using the program, you are required to become a
  144.           Registered user. Send a completed copy of the Registration Form (which
  145.           is included in this documentation), together with a check or money
  146.           order for $35.00 (+ $5.00 for shipping outside the continent of North
  147.           America) either to me at the address which appears on the form or (for
  148.           European users) to the address displayed on the European version of
  149.           the program's copyright screen. Checks and money orders in
  150.           denominations other than U.S. dollars are welcome, but please add a
  151.           further $5.00 for bank charges and use the current exchange rate to
  152.           calclate the fee if you are paying with such a check or money order.
  153.           Please also add $2.50 (or equivalent) if you want the software on a
  154.           1.2 Mb HD floppy or a 3.5" minifloppy, rather than a 360 Kb DSDD
  155.           floppy, and specify which you want on the Reg. form. I will send you a
  156.           personalised copy of the latest, considerably enhanced, version of the
  157.           HDTEST package (currently V4.71), and register you for a year's
  158.           support. Note that the Registered version of the package will be
  159.           shipped from the United States (by Airmail, for non-U.S. users), even
  160.           if you use the European address, but European Registrations sent to
  161.           that address are forwarded by computer network, and will usually reach
  162.           me faster than if they were mailed to me in the U.S.A. Registration
  163.           entitles you to be notified of upgrades, bug fixes, newly discovered
  164.           incompatibilities, etc., and to ask for (and get) necessary help in
  165.           adapting the program to work on your hardware. I cannot guarantee to
  166.           make HDTEST work with every possible combination of hardware and
  167.           software, but I will promise to try to solve problems as they come up,
  168.           and I will return your registration fee if I cannot support your
  169.           
  170.           
  171.                                           Page 3                                
  172.           
  173.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  174.           
  175.           
  176.           system.  Support will be available TO REGISTERED USERS ONLY by mail,                                             ________________________         
  177.           BIXmail, Compuserve EMail and telephone. Please also bear in mind that
  178.           my willingness and ability to continue to support and enhance these
  179.           programs will be directly dependent on users' willingness to pay the
  180.           registration fee and (to some extent) inversely dependent on the
  181.           number of questions I get that could be answered by reading the docu-
  182.           mentation(!).
  183.           
  184.           The HD programs were written principally in C, compiled by the
  185.           Microsoft C compiler (Version 5.10) using its "small" memory model,
  186.           and linked with code from the distributed Microsoft C object libraries
  187.           using the Microsoft LINK program (Version 3.65).  Additional assembly
  188.           language routines were assembled by the Microsoft MASM Macro Assembler
  189.           (Version 5.10). Portions of the distributed program code are
  190.           consequently Copyright by Microsoft Corp., 1985 - 1988. All rights
  191.           reserved. These portions are used under the terms of a license from
  192.           Microsoft Corp.
  193.           
  194.           The HD programs were written with care and have been tested on a
  195.           number of different systems.  I cannot, however, give any guarantee as
  196.           to their performance on a specific system, nor can I accept liability
  197.           for any actual or consequential loss resulting from their use. The
  198.           programs may only be used and/or copied in their original form.
  199.           Unauthorised modifications and/or the use of all or part of the
  200.           programs in other software, commercial or otherwise, are strictly
  201.           prohibited.
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.           
  234.           
  235.                                           Page 4                                
  236.           
  237.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  238.           
  239.           
  240.           
  241.                                       GETTING STARTED                                      _______________
  242.           
  243.           This section gives step by step instructions for running HDCHEK and
  244.           HDTEST on the C: drive of a standard IBM PC, XT, or 100% compatible.
  245.           Users of ATs or AT-compatibles may safely follow them too, but should
  246.           really read the description of (and use) the /A command line flag.
  247.           Subsequent sections also describe some of the program's other features
  248.           and options in more detail, and should help to explain and let you
  249.           deal with any problems which you may encounter. Note that you should
  250.           never attempt to run HDTEST under a multi-tasking or multi-user          _____                                                          
  251.           operating system, nor activate any "pop-up" program (e.g. SideKick)
  252.           while it is running.
  253.           
  254.           1) Use the DISKCOPY program to make a duplicate of the distribution
  255.           disk, put the original away in a safe place, and use the duplicate as
  256.           your working disk.
  257.           
  258.           2) Make sure that you have current backups of all the files on drive
  259.           C:. This is particularly important when running the program for the
  260.           first time on a new system.
  261.           
  262.           3) Run DOS's CHKDSK program on drive C: and correct any errors
  263.           reported by it before proceeding further.
  264.           
  265.           4) Make the drive and/or directory which contains HDCHEK.EXE and
  266.           HDTEST.EXE your current drive and/or directory.
  267.           
  268.           5) Insert a formatted, non-write-protected floppy disk in drive A.
  269.           HDTEST will write an ASCII log file called HDTEST.LOG to this disk -
  270.           any other files on it will be undisturbed.
  271.           
  272.           6) Give the command: "HDCHEK C:". After a certain amount of disk
  273.           activity has taken place, and certainly within a minute or two, your
  274.           screen should look like one of the examples given in Appendix C. If
  275.           any errors are reported, DO NOT PROCEED until you have read the rest                                   ______________                             
  276.           of the documentation and/or are sure you know what is going on.
  277.           
  278.           7) If HDCHEK reported no errors, give the command "HDTEST C: A:".             ____________________________                                  
  279.           After some disk activity, the program will prompt for replies to three
  280.           or four questions - press <Return> in response to each prompt. The
  281.           program will report its progress to the screen and will record any
  282.           problems encountered in the log file on the floppy disk. Depending on
  283.           the size of your DOS partition and the access time of the disk, a
  284.           complete run of HDTEST (in its normal, "slow", mode) will take between
  285.           2 and 5 hours. Your intervention will only be required if a recovered                  _____                                                        
  286.           bad cluster is found in a "hidden", "system", or write-protected file,
  287.           when you will be asked to approve remapping; otherwise, bad clusters
  288.           will be automatically remapped. HDTEST can be aborted at any time by
  289.           pressing <Esc> and responding to the "Are you sure...." prompt by
  290.           pressing <Return>.
  291.           
  292.           8) If HDTEST finishes testing without finding any bad clusters, it
  293.           will simply record that fact and the finishing time in the log file
  294.           and return to the DOS prompt. Otherwise, when read/write testing has
  295.  
  296.  
  297.           
  298.           
  299.                                           Page 5                                
  300.           
  301.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  302.           
  303.           
  304.           been completed, you will be prompted for permission to complete the
  305.           remapping process by updating the disk FATs and Directories.  Pressing
  306.           <Return> will allow this to take place, and you will then be returned
  307.           to the DOS prompt.
  308.           
  309.           9) N.B. If HDTEST reported and remapped any bad clusters and you are             ____                                                  ___        
  310.           using either the DOS (3.3 and above) FASTOPEN utility, or any other
  311.           resident directory- or file-caching software, you should reboot your
  312.           system before proceeding with other work on it.
  313.           
  314.           10) If HDTEST reported and remapped some bad clusters, you should also
  315.           read the section on "Dealing with bad clusters" later in this
  316.           documentation.
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.           
  362.           
  363.                                           Page 6                                
  364.           
  365.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  366.           
  367.           
  368.           
  369.                              HARDWARE & SOFTWARE REQUIREMENTS                             ________________________________
  370.           
  371.           HDTEST and HDCHEK make a number of assumptions about the environment
  372.           in which they are operating. They will, generally speaking, abort with
  373.           an informative error message if they find one of these assumptions to
  374.           be invalid! The programs require MS/PC-DOS 2.x or above and (for
  375.           HDTEST) up to about 256 Kb of free memory (the exact amount required
  376.           depends on the size and other characteristics of the device being
  377.           tested) to run - the presence of more memory may (slightly) increase
  378.           HDTEST's speed when testing devices with large cluster sizes. The
  379.           device to be tested must be usable as a normal DOS device - commands
  380.           such as DIR, COPY, and CHKDSK should be valid for it and for files and
  381.           subdirectories on it. It need not, however, be bootable. Only the DOS
  382.           partition of a multi-operating-system disk will be tested, but all the
  383.           partitions of a disk that is divided into multiple DOS partitions can                                                             ___               
  384.           be tested (one by one). This version of HDTEST fully supports DOS 3.3
  385.           extended partitions, and will test them as thoroughly as it does
  386.           normal DOS partitions. HDTEST's support for other disk partitioning
  387.           software is provided only to the extent that DOS support is provided
  388.           by the authors of the partitioning software.
  389.           
  390.           If you wish to test a new hard disk which is to be configured to                         ____                                             
  391.           support multiple operating systems, you should first configure it as a
  392.           single DOS partition, then test it in that configuration, and finally
  393.           reconfigure it to the form in which you are going to use it. Note          __                                                               
  394.           that, under these circumstances, HDTEST can only be used as a test -                                                      ____              ____  
  395.           when you repartition the disk, any remapping and/or marking of bad
  396.           clusters which HDTEST may have done is lost, unless your partitioning
  397.           software also allows you to specify bad sectors to be locked out.
  398.           
  399.           Ideally, for normal hard disks, the BIOS handler for interrupt 13
  400.           should be capable of handling (at least) normal disk reads and writes
  401.           (sub-functions 2 and 3) in a way that is compatible with that
  402.           documented for the XT disk adapter in IBM's technical documentation.
  403.           This should be no problem for most disk systems on IBM PCs and most
  404.           compatibles.  HDTEST may, however, be forced to use the (somewhat more
  405.           limiting) DOS device interface when used with non-bootable hard disks
  406.           and/or with hard disks which require special device drivers to be
  407.           installed, and will be forced to use the DOS device interface when
  408.           dealing with disks partitioned by means other that the DOS 3.3
  409.           utilities. Earlier V4.xx releases of HDCHEK and HDTEST would abort if
  410.           run on small (<= 10 Mb) hard disks which had been patched to use a
  411.           cluster size smaller than the DOS standard (and 16-bit FATs). This
  412.           deficiency has been corrected in the current version, but very small
  413.           (less than 1024 clusters) partitions may still cause problems if 16-
  414.           bit FATs are used (there is no good reason why such partitions should
  415.           use 16-bit FATs).
  416.           
  417.           If run under DOS 3.0 or above on an IBM INT 13 compatible hard disk,
  418.           HDTEST attempts to locate and use the ROM BIOS INT 13 entry point,
  419.           rather than the normal INT 13 vector (which DOS 3.x intercepts and
  420.           interferes with). By default, unless the /H option is used to force a
  421.           different segment address, or the /A, /D or /I flag is set, the
  422.           program may assume that, if a ROM is present at absolute address                                   ___________________                    
  423.           C8000H, it contains the hard disk BIOS and has initialization code                                                 ___                        
  424.           starting at offset 3. This assumption is true for all hard disks which
  425.           
  426.           
  427.                                           Page 7                                
  428.           
  429.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  430.           
  431.           
  432.           "plug in" to the IBM PC and XT. It may not be true for all clones
  433.           which come with hard disks installed, although it is likely to be true
  434.           for most of them. The AT and most of its clones have no ROM at all at
  435.           this location, which is OK, too, even if you forget to use the /A flag
  436.           (but see para 5 in the "Limitations and Restrictions" section).
  437.           Problems (up to and including system halts) may occur if none of the
  438.           above flags is set and there is a ROM at C8000H but it does not                                       __                             ___
  439.           control the hard disk. They are almost guaranteed under these
  440.           circumstances if the initialization code does not start at offset 3 in
  441.           the ROM. If you know that your hard disk ROM is located somewhere
  442.           other than at the default segment address, you can use the /H flag to
  443.           tell the programs where to look for it. If you have other problems
  444.           running HDCHEK and HDTEST on non-standard systems, try running the
  445.           programs with the /I flag (for PCs and XTs) or the /A flag (for ATs),
  446.           or with the /D flag (for any hardware), and/or with the /C flag. All
  447.           these command line flags are discussed in more detail below.
  448.           
  449.           Note that, since HDTEST remaps bad clusters to free space, there is
  450.           not much point in running it on a disk which has none (as shown by DIR
  451.           or CHKDSK), since the program will abort immediately if it finds a bad
  452.           cluster.  Unless you have a really flaky disk, however, you should not
  453.           need more than a couple of hundred Kb free to remap any reasonably
  454.           probable number of bad clusters.
  455.           
  456.           ANSI.SYS or another ANSI console device driver should be installed on
  457.           those systems (including the IBM family) which do not support ANSI
  458.           screen I/O in Video BIOS - nothing terrible will happen if ANSI.SYS is
  459.           not installed, but the screen display will be very strange (!!).
  460.           HDTEST has been tested with the Public Domain NANSI driver, as well as
  461.           with FANSI-CONSOLE (tm).
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.           
  490.           
  491.                                           Page 8                                
  492.           
  493.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  494.           
  495.           
  496.           
  497.                                LIMITATIONS AND RESTRICTIONS                               ____________________________
  498.           
  499.           The current version of HDTEST has a few limitations, most of which
  500.           result from the way data is stored internally by the program. None of
  501.           them are "etched in stone", although some could only be avoided at the
  502.           cost of slowing down what is already far from a fast process. The
  503.           known limitations are as follows:
  504.           
  505.           1) Maximum number of clusters per partition = 24,000 (the number is
  506.           approximate, because it depends on dynamic memory allocation). This
  507.           limit may be increased to 32,768 in a subsequent version of the
  508.           program.
  509.           
  510.           2) Maximum cluster size = 65,528 bytes. I do not believe that a DOS
  511.           disk can ever have clusters larger than 64 Kb, but my limit is a few
  512.           less than that and may, since sector and cluster sizes tend to run in
  513.           powers of 2, effectively limit cluster size to 32 Kb - this should be
  514.           enough for most people!.
  515.           
  516.           3) Because of certain hardware limitations of the chips used to
  517.           support direct memory access (DMA, the method used to transfer data
  518.           from disk to memory and vice versa) in the IBM PC and most clones and
  519.           compatibles, HDTEST may be unable to use available memory efficiently
  520.           when cluster sizes (and the buffers needed to hold them) are large.
  521.           This inefficiency can result in "Insufficient Memory" or "Memory
  522.           Allocation" errors, even on systems with more than the minimum 256 Kb
  523.           of free memory prescribed above. The only cure for this is to free up
  524.           (or buy!) more memory (remove RAMdisks, remove resident software,
  525.           etc.).
  526.           
  527.           4) This version of HDTEST will run on ATs and most AT clones, but may
  528.           not, even with the /A flag set, be able to detect corrected ECC errors
  529.           when run on some of the clones - a warning message will be displayed
  530.           when the program initializes itself if corrected ECC errors are not
  531.           being detected.  The program will also not detect corrected ECC errors
  532.           when invoked with the /I flag (under DOS 3.0 or above) or the /D flag.
  533.           
  534.           5) The current Shareware version of HDTEST will run under IBM DOS 4.0
  535.           and Compaq DOS 3.31 but cannot be used to test the large (> 32Mb) DOS
  536.           partitions which these DOS versions support. The Registered version of
  537.           the program fully supports these large partitions.
  538.           
  539.           6) For reasons which are poorly understood (at least by the author!),
  540.           HDTEST runs very slowly on Epson Equity II systems, particularly when                      ____                                                     
  541.           used to test "plug-in" hard drives of the "Hardcard" or "Flashcard"
  542.           variety. For this hardware, the estimated run times given elsewhere in
  543.           the documentation need to be multiplied by about 2.5.                                       __________          ___ 
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.           
  554.           
  555.                                           Page 9                                
  556.           
  557.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  558.           
  559.           
  560.           
  561.                                    RUNNING THE PROGRAMS                                   ____________________
  562.           
  563.           Always run HDCHEK on any new hardware/software configuration before
  564.           you attempt to run HDTEST (at least the first time). The latter
  565.           program has been written as conservatively as possible, but it is not
  566.           possible to predict the behavior of every conceivable combination of
  567.           hardware and operating system when dealing with a program which
  568.           bypasses most of the controls which normally protect the user from
  569.           destroying his world. HDCHEK is invoked with the command line:
  570.           
  571.                    HDCHEK device [/A] [/Cn] [/D | /I] [/Hnnnn]
  572.           
  573.           "device" is the device to be tested (e.g. A:, B:, etc. - the colons
  574.           are permitted but not required). For versions of HDCHEK from V4.35,                            ___                                              
  575.           the spaces between the device identifier and the flags (and between
  576.           different flags) are optional - the command lines "HDCHEK C:/C2/D" and
  577.           "HDCHEK C: /C2 /D" are equivalent.
  578.           
  579.           The /A(T) flag is used to tell the HD program that it is being run on
  580.           an AT or AT-clone (which has its hard disk BIOS in the system ROM at
  581.           F0000H, rather than in a separate ROM at C8000H). This flag also
  582.           forces HDTEST to compensate for a known bug in the (IBM) AT's floppy
  583.           disk BIOS when used on 1.2 Mb floppy disks.
  584.           
  585.           The /C(lone BIOS) flag is used in systems which do not support the IBM
  586.           BIOS's INT 11 "equipment determination" BIOS function (e.g. the Tandy
  587.           2000). The parameter ("n") is the number of floppy drives attached to
  588.           the system, which is normally determined automatically.
  589.           
  590.           The /D(OS interrupts) flag forces HDCHEK to use the hardware-
  591.           independent DOS interrupt 25 for access to the target device. It is
  592.           usually not required, since the program is usually smart enough to          _______                                    _______                
  593.           recognize devices which have to be accessed this way (e.g. logical
  594.           disk partitions, non-bootable hard disks, some removable-media hard
  595.           disks). If the /D flag is not used, the program will issue a warning                                    ___                                       
  596.           message if it finds it has to use the DOS interrupts.
  597.           
  598.           N.B. the definition of the /D flag changed at V4.00 - the new /I flag          _____________________________________________________________________
  599.           has the same effect as the old (pre-V4.00) /D flag. Only one of these          _____________________________________________________________________
  600.           flags may be present on the command line.          _________________________________________
  601.           
  602.           The /I(nterrupt 13) flag has no effect under DOS 2.x.  Under DOS 3.0
  603.           or above, it forces HDCHEK to use the existing INT 13 vector (which it
  604.           always does under DOS 2.x), and prevents the program from trying to
  605.           determine the ROM BIOS entry point; the flag should be used if you
  606.           know that your system's fixed disk BIOS uses INT 13 but does not
  607.           follow IBM's "rules" or if the program crashes the system when invoked
  608.           without it.
  609.           
  610.           The /H(ex BIOS address) flag is used to tell the HD programs that the
  611.           ROM BIOS of the device being tested is located at nnnn, which is
  612.           interpreted as a Hexadecimal segment address, rather than at C800,
  613.           which is the default. There must be no space between the H and the
  614.           number. /HF000 is similar to /A in its effects, but does not correct
  615.           for the bug in the IBM AT floppy disk BIOS mentioned in the above
  616.           description of the latter flag.
  617.           
  618.           
  619.                                          Page 10                                
  620.           
  621.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  622.           
  623.           
  624.           
  625.           After a short delay, during most of which the specified device will be
  626.           active, a description of the device's logical structure will be disp-
  627.           layed.  After a further delay, and more disk activity, a message will
  628.           be printed giving the number of files and subdirectories found on the
  629.           disk, and the program will exit back to DOS. Note that the total
  630.           number of files and subdirectories reported by HDCHEK will be greater
  631.           than the sum of the counts reported by CHKDSK. This is because HDCHEK
  632.           counts the "." and ".." entries in subdirectories and CHKDSK doesn't.
  633.           
  634.           Errors and/or problems encountered, if any, will be reported on in
  635.           some detail. A number of example screen displays and log files
  636.           produced by running HDCHEK (and HDTEST) on different systems will be
  637.           found in Appendix C at the end of this documentation.
  638.           
  639.           Always run the DOS CHKDSK program immediately before running HDTEST on
  640.           a disk. If CHKDSK reports any problems, its /F option (or other means)
  641.           should be used to correct them before HDTEST is run.                                         ____________________ 
  642.           
  643.           HDTEST is invoked with the command line:
  644.           
  645.                     HDTEST device1 [device2] [optional parameters]
  646.           
  647.           "optional parameters" may include one or more of the following:
  648.           
  649.           [/A] [/B] [/Cn] [/D | /I] [/F] [/Hnnnn] [/N] [/P] [/Rn] [/Snnnnn] [/Zn]
  650.           
  651.           "device1" is the name of the device to be tested, as for HDCHEK.
  652.           "device2" (which, if present, must be different from "device1") is the
  653.           name of a device on which a log file (called HDTEST.LOG) is to be
  654.           written. If "device2" is not specified, errors are reported to the
  655.           console terminal and the DOS console redirection facility should NOT                           ___________________________________________________
  656.           be used in an attempt to redirect them elsewhere. For versions of          ________________________________________________                 
  657.           HDTEST from V4.35, the spaces between the device identifier and the
  658.           flags (and between different flags) are optional - the command lines
  659.           "HDTEST C:/A/F" and "HDTEST C: /A /F" are equivalent.
  660.           
  661.           The /A, /C, /D, /H, and /I flags have the same meaning and effect that
  662.           they do for HDCHEK. When used for HDTEST, the /D flag forces the use
  663.           of INT 25 to read from and INT 26 to write to the target disk.
  664.           
  665.           The /B(oot/Partition sector test) flag forces the program to include
  666.           the boot/partition sector (track 0, head 0, sector 1) in the DOS area
  667.           for the purposes of read/write testing. The default action is only to
  668.           perform read and seek tests on this sector, even if read/write testing
  669.           of the DOS area is specified. Since the boot/partition sector is
  670.           effectively read-only under normal circumstances (it is only written                                                                       _______
  671.           to during low-level formatting and by FDISK), read/write testing is          __                                                                 
  672.           less vital than for the rest of the disk. In addition, at least one
  673.           hard disk controller (a Western Digital board which allows a single
  674.           disk to be addressed as two "physical" devices) will not allow test
  675.           patterns to be written to this sector. Certain devices (chiefly
  676.           RAMdisks) appear to DOS to be hard disks but do not, in fact, possess
  677.           boot/partition sectors. On these devices, HDTEST will report
  678.           check/test results on the boot/partition sector while actually
  679.           reading/writing the device's boot sector - the latter sector will
  680.           simply end up being checked/tested twice under these circumstances.
  681.           
  682.           
  683.                                          Page 11                                
  684.           
  685.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  686.           
  687.           
  688.           
  689.           The /F(ast mode) flag causes the program to use only two test patterns
  690.           (all 1s and all 0s) for read/write testing. It is intended for use on
  691.           floppy disks and for "quick and dirty" testing of other devices.
  692.           
  693.           The /N(o Query) flag disables the individual prompts for confirmation
  694.           which the program normally issues before remapping clusters which are
  695.           marked as "Reserved" or which are part of a file which is marked as
  696.           "System", "Hidden", or "Readonly".  The /N flag does not prevent the                                                               ___            
  697.           program from prompting for confirmation before updating the disk.
  698.           
  699.           The /P(rint) flag causes the log file to be directed to the PRN device
  700.           (normally LPT1), and overrides any "device2" specification.
  701.           
  702.           The /R(epeat)n flag causes HDTEST to go through n complete testing
  703.           cycles (omitting n, or setting it to zero, causes HDTEST to run
  704.           continuously until terminated by pressing <Esc>). Instead of stopping
  705.           after completing the testing of allocated data clusters, the program
  706.           immediately starts again with the DOS area. Any bad clusters found and
  707.           flagged in the first pass should be reported as "already marked as
  708.           bad" in subsequent passes. The /R flag implicitly sets the /N flag.
  709.           
  710.           The /S(tart)nnnnn flag causes HDTEST to start testing occupied                                                                ________
  711.           clusters at cluster number nnnnn (expressed as a decimal number).
  712.           There must be no space between the "S" and the number. This option
  713.           will mainly be useful when a previous run of HDTEST was interrupted
  714.           (by pressing <Esc>), since it allows you to start where you left off.
  715.           Note that, in order to be sure that data is not remapped to a bad
  716.           area, HDTEST always tests all empty clusters before starting to test                       ______       ___                                       
  717.           occupied clusters. For this reason, using the /S flag will not result
  718.           in a large time saving if your disk is nearly empty, and it will make
  719.           the most difference on a full, or nearly full, disk.
  720.           
  721.           The /Z(ero bad sectors)n flag controls how HDTEST deals with sectors
  722.           that cannot be read correctly (unrecoverable read errors) when it
  723.           remaps bad clusters. Versions of HDTEST up to and including V4.10
  724.           (somewhat cavalierly) disregarded the remaining contents of the entire
  725.           cluster if one or more sectors in it were unreadable, and remapped it
  726.           to a cluster of NULLs. The default action is now to replace only the
  727.           unreadable sectors with NULLs, transferring the remaining sectors                     _______                                               
  728.           intact to the remapped cluster. There are, however, two other options,
  729.           which can be chosen by setting n to 0 or 2 (if n is omitted, 1, or any
  730.           other number, the default action is taken). Setting n to 0 uses the
  731.           old default (remaps the bad cluster to a cluster of NULLs), while          ___                                      _______                 
  732.           setting n to 2 goes to the other extreme and copies all data read
  733.           (some of which is almost certainly invalid) to the remapped cluster.
  734.           It is always safe and often advisable to use the /Z2 option provided                                                                      ________
  735.           that you do not try to use any non-ASCII files that have been remapped          ______________________________________________________________________
  736.           with unrecovered read errors and this (/Z2) option. Remapped ASCII          ___________________________________________________               
  737.           files can be inspected with an editor and fixed up where necessary -
  738.           non-ASCII files (e.g. .EXE, .COM, .WKS files) may appear to be
  739.           undamaged (the program may run, the worksheet be readable, etc.) but
  740.           can still contain a small change which will cause trouble later, and
  741.           they cannot easily be checked. The large "holes" which /Z options 0
  742.           and 1 leave in such files usually allows it to be much more obvious
  743.           that they are defective!
  744.           
  745.           
  746.           
  747.                                          Page 12                                
  748.           
  749.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  750.           
  751.           
  752.           After displaying its copyright message, HDTEST reads the FATs and
  753.           scans the root directory and all subdirectory trees of the specified
  754.           device before initiating a short dialogue. All questions are of the
  755.           "Yes/No" type and should be answered by typing "Y" or "N" (case does
  756.           not matter) and pressing the <Return> key.  Pressing the <Return> key
  757.           alone is equivalent to giving the default response (which appears in
  758.           square brackets at the end of each prompt).  HDTEST then proceeds to
  759.           test the specified device. By default, the DOS area (boot sector,
  760.           FATs, and root directory) is not subjected to Read/Write testing,
  761.           since failures in this area usually make themselves apparent fairly
  762.           rapidly. The user can, however, choose to run these tests on the DOS
  763.           area too, or to limit testing to read and seek tests only over the
  764.           whole partition.
  765.           
  766.           In its reports to the screen, HDTEST uses the convention that read-
  767.           only testing is "Checking" while read/write testing is "Testing" - it
  768.           always "checks" the boot/partition sector and the rest of the DOS
  769.           area, but only "tests" them if requested to do so.
  770.           
  771.           In "checking" or "testing" a block (sector or cluster), HDTEST first
  772.           reads it (retrying, if necessary, up to five times) and then does the
  773.           longest possible seek away from it before attempting to read it again.
  774.           "Checking" is complete at this point. "Testing" continues with the
  775.           program sequentially writing 20 (or 2, for "fast mode") different bit
  776.           patterns to the block and checking that each one can be read
  777.           correctly, before rewriting the original contents of the block (and
  778.           checking to ensure that it has been restored correctly). Errors that
  779.           occur at any point in this process are reported and (if the block is
  780.           in the data area - errors in the DOS area are always treated as fatal)
  781.           the block is remapped. If an error is detected in a "Reserved" cluster
  782.           or in one that is part of a file which is marked as "System",
  783.           "Hidden", or "Readonly", the user is normally asked for confirmation
  784.           before the cluster is remapped, otherwise it is assumed that remapping
  785.           is desired.
  786.           
  787.           HDTEST keeps its own copy of the FAT and a map of the device's
  788.           directory structure in memory. A bad cluster is remapped by
  789.           transferring its contents to a previously free cluster and (if the bad
  790.           cluster was in use) changing all necessary FAT and directory entries
  791.           so that the pointer chain which maintains the structure of the
  792.           affected file or subdirectory remains valid. The bad cluster's FAT
  793.           entry is then altered to identify it as bad to DOS. The device's FATs                                                                  ________     
  794.           and directories are not altered until the whole device has been
  795.           scanned, and then only after the user has confirmed that it is OK to
  796.           proceed. This means that a power failure and/or an inadvertent power-
  797.           off which occurs while the program is running will cause the loss of,
  798.           at most, one cluster of data and of no FAT or root directory
  799.           information (unless you are very unlucky and it happens after you have                                      ____                                      
  800.           confirmed that you want a damaged data area to be remapped and while
  801.           this is being done). If a power failure and/or power-off occurs while
  802.           a cluster which contains the directory information of a subdirectory
  803.           is being tested, part or all of that subdirectory will probably become
  804.           inaccessible to DOS, although the data in it will remain on the disk
  805.           and be potentially recoverable with the aid of (e.g.) the Norton
  806.           Utilities (TM).
  807.           
  808.           You can safely interrupt the testing process part way through (by
  809.           
  810.           
  811.                                          Page 13                                
  812.           
  813.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  814.           
  815.           
  816.           pressing the <Esc> key) with no risk of leaving a partially updated
  817.           FAT or directory. If you do interrupt the program in this way, you
  818.           will still be given the option of updating the disk, so that bad
  819.           clusters which were detected before <Esc> was pressed can be remapped.
  820.           
  821.           Errors which occur in the program's initialization phase cause it to
  822.           abort with an error message and (sometimes) a hexadecimal error code.
  823.           The meaning of the error code is context-dependent. Errors detected
  824.           during read-write testing only cause the program to abort if they
  825.           occur during testing of the DOS area, or if remapping is impossible
  826.           (only likely to happen if the disk is full). In any event, a
  827.           description of the error is written to the log file (if any) and/or to
  828.           the screen. This specifies the cluster or (for the DOS area) sector
  829.           number and the name of the affected file (if any), and defines the
  830.           type(s) of error which occurred. Appendix B contains a discussion of
  831.           some of the more technical aspects of data storage on disks (floppy
  832.           and hard), and includes more information about some of the possible
  833.           errors that may be encountered.
  834.           
  835.           HDTEST takes a very long time to run to completion because of the                         ____                                              
  836.           large number of reads and writes it does for each cluster. A typical
  837.           time for full testing ("slow" mode) of an XT disk (10 Mb) would be 2
  838.           hrs; full disk testing on a 30 Mb Enhanced AT takes at least 4 hrs.
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.           
  874.           
  875.                                          Page 14                                
  876.           
  877.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  878.           
  879.           
  880.           
  881.                                  DEALING WITH BAD CLUSTERS                                 _________________________
  882.           
  883.           It is, unfortunately, not unusual for a new hard disk to have a small,                                                                          _____ 
  884.           constant, number of bad clusters. IBM's quality control standards          ________                                                         
  885.           allow, for example, 5% of the surface area of a disk to be bad (!).
  886.           These bad clusters, which correspond to imperfections in the magnetic
  887.           coating on the disk, will normally be detected and marked by the DOS
  888.           FORMAT program, and HDTEST will report them as "already marked as
  889.           bad".  This should not be regarded as evidence of any real problem
  890.           with the disk, although some suppliers (not including IBM) will                                                  ___                    
  891.           replace such disks under warranty if pressed to do so.  It is also not
  892.           unusual for a disk to develop a few more defects as it ages. When                                          ___                              
  893.           these do develop, they are also usually constant in size and position,
  894.           and will be reported as "already marked as bad" by HDTEST on runs
  895.           subsequent to that during which they are first found. The occasional                                                                    __________
  896.           appearance (and subsequent persistence) of a new bad cluster is,
  897.           therefore, not necessarily evidence of serious trouble developing.
  898.           However, if more than one or two new bad clusters are reported by
  899.           HDTEST, and especially if two consecutive runs (or passes, if the /R
  900.           flag is set) of HDTEST report different bad clusters, there is a good                                        _________                              
  901.           chance that the hard disk or controller is developing a serious
  902.           problem - the disk should be backed up immediately and the disk and/or
  903.           controller sent for repair at the earliest opportunity.
  904.           
  905.           New bad clusters in the data area are automatically mapped out by
  906.           HDTEST, and no further action is necessary. Bad sectors in the DOS
  907.           area can be handled in two ways:
  908.           
  909.           1) If you are able to do a low-level format on your hard disk (most                                     _________                               
  910.           makers of "add-on" hard disks supply a method of doing this, either in
  911.           the form of a short program, or by giving instructions for running a
  912.           program in the ROM BIOS from DEBUG), back up the entire hard disk                                                           ______          
  913.           (including any non-DOS partitions), run the low-level format, use
  914.           FDISK to repartition the disk, and then run the DOS FORMAT program. If
  915.           HDTEST now reports no errors in the DOS area you can restore all your
  916.           files and continue to use the disk. You should, however, use HDTEST to
  917.           test (at least) the DOS area fairly frequently for a month or so to be
  918.           sure that the problems are not going to recur.
  919.           
  920.           2) If you do not have the means to do a low-level format, or if you
  921.           follow the above instructions and HDTEST continues to report errors in
  922.           the DOS area, your only other choice is to back up the DOS partition,
  923.           reconfigure the disk with FDISK so that the new DOS partition starts
  924.           above the bad area, reFORMAT it, and restore all of the old files to
  925.           the new DOS partition (which will unavoidably be a little smaller than
  926.           the old).
  927.           
  928.           If absolute sector zero (track 0, Head 0, sector 1) becomes bad, the
  929.           disk is useless and must be replaced. This sector is only subjected to
  930.           read/write testing if the /B flag is specified on the command line, so          __________                                                            
  931.           any reported errors (in sector -1) during normal testing represent a                                         __                                   
  932.           problem reading the sector and are likely to be significant. Problems                  _______                                                      
  933.           encountered during read/write testing of this sector do not always                                                                  ___       
  934.           indicate a bad disk - certain controller cards may not allow test
  935.           patterns to be written to it, resulting in a report of multiple errors
  936.           on read/write testing. Consequently, if multiple errors are reported
  937.           
  938.           
  939.                                          Page 15                                
  940.           
  941.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  942.           
  943.           
  944.           on read/write testing of this sector, but read-only testing proceeds
  945.           without problems and the rest of the disk seems to be OK, there is
  946.           probably no cause for concern.
  947.           
  948.           
  949.                             BUGS AND OTHER UNPLEASANT SUBJECTS                            __________________________________
  950.           
  951.           Although, like all programmers, I like to think that my product is
  952.           perfect, it is possible that there are a few bugs lurking in the
  953.           depths of the program, and likely that some combination of software
  954.           and hardware exists which HDTEST cannot figure out and/or cope with.
  955.           If you think you have found a bug and/or if you cannot get either of
  956.           the programs to work on your system, do the following:
  957.           
  958.           1) Reread this documentation! Make sure that you are doing exactly
  959.           what the documentation says to do. Make sure (if you are testing a
  960.           drive with removable media) that the media is not write-protected.
  961.           
  962.           2) Boot your system from a "virgin" DOS disk - preferably a copy of
  963.           your DOS distribution disk - and try to run the HD programs again. If
  964.           they run in this environment but not in your normal DOS environment,
  965.           try reconstructing the system under which they failed by adding things
  966.           one by one until the problem recurs. If you find a specific piece of
  967.           software which causes the trouble, let me know about the
  968.           incompatibility.
  969.           
  970.           3) If the above approaches do not help, or if HDCHEK runs but HDTEST
  971.           bombs (the reverse should never happen), send me as detailed a
  972.           description of the problem as possible and I will do my best to
  973.           diagnose and fix it. A bug report should always include a full                                                   ______               
  974.           description of the system being used, as well as the output from a run
  975.           of HDCHEK.
  976.           
  977.           I can be contacted by U.S. mail at the address on the Registration
  978.           Form, by BIXMail to pfletcher, or by Compuserve EMail to 72255,305. Be
  979.           aware that, although I do pay attention to bug and problem reports
  980.           from people who are not Registered users, the latter will always be
  981.           given priority.
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.           
  1002.           
  1003.                                          Page 16                                
  1004.           
  1005.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1006.           
  1007.           
  1008.           
  1009.                               CHANGES FROM PREVIOUS VERSIONS                              ______________________________
  1010.           The first version of the HD programs actually released (not including
  1011.           beta-test versions) was V2.60. The programs have grown and developed
  1012.           gradually, for the most part, but the releases listed below have
  1013.           constituted the most significant "watersheds" - features added and
  1014.           changes made between listed releases are treated here as if first                       _______                                             
  1015.           included in the next listed release.
  1016.           
  1017.           
  1018.           Version 4.45 (this version)          ____________               
  1019.           
  1020.           1) Deficiency causing "fallback" to DOS interrupt level under some
  1021.           circumstances when attempting to test "extended devices" on the second
  1022.           physical hard drive fixed (HDCHEK and HDTEST).
  1023.           
  1024.           2) Limited support for IBM DOS 4.00 and Compaq DOS 3.31 large
  1025.           partitions added - these partitions are now recognized as valid
  1026.           (allowing HDTEST to be used to test "normal" partitions on systems
  1027.           which include large ones) but cannot, themselves, be tested (HDCHEK                _______                                                      
  1028.           and HDTEST).
  1029.           
  1030.           
  1031.           Version 4.41          ____________
  1032.           
  1033.           1) Deficiency (introduced at V4.00) causing HDCHEK to issue an
  1034.           incorrect error report on an abort resulting from a FAT comparison
  1035.           error corrected.
  1036.           
  1037.           2) Minor deficiency, causing HDTEST to create an empty log file on the
  1038.           specified device when both a log device and the /P flag were
  1039.           present, corrected.
  1040.           
  1041.           3) Work-around for hardware multi-sector read ECC problem (see
  1042.           Appendix B) added to HDTEST.
  1043.           
  1044.           4) Support for small (<= 10 Mb) hard disks patched to have small
  1045.           clusters and 16-bit FATs added.
  1046.           
  1047.           5) Requirement that option flags be separated from device specifier(s)
  1048.           (or each other) by one or more spaces or tabs, removed.
  1049.           
  1050.           6) /R option added to HDTEST for multi-pass disk testing.
  1051.           
  1052.           
  1053.           Version 4.30          ____________
  1054.           
  1055.           1) Support for BIOS-level access to DOS 3.3 extended partitions added.
  1056.           
  1057.           2) /Z option added to HDTEST to control remapping of unreadable
  1058.           sectors in bad clusters.
  1059.           
  1060.           
  1061.  
  1062.  
  1063.  
  1064.  
  1065.           
  1066.           
  1067.                                          Page 17                                
  1068.           
  1069.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1070.           
  1071.           
  1072.           Version 4.10          ____________
  1073.           
  1074.           1) Assorted minor changes made to screen display.
  1075.           
  1076.           2) /C option added to allow the programs to be used on some non-IBM
  1077.           compatible MS-DOS systems.
  1078.           
  1079.           3) /D option redefined - old /D option became new /I option.
  1080.           
  1081.           4) /F option for fast read/write testing added to HDTEST.
  1082.           
  1083.           5) /H option added to allow BIOS-level access to the disk on systems
  1084.           with non-standard hard disk BIOS locations.
  1085.           
  1086.           
  1087.           Version 3.13          ____________
  1088.           
  1089.           1) Assorted minor bugs and deficiencies in error reporting and
  1090.           termination routines in HDTEST fixed.
  1091.           
  1092.           2) Minor bug in HDTEST, causing multiple recovered ECC errors
  1093.           occurring during initial cluster reads to be reported as recoverable
  1094.           errors without further qualification as to their type and origin,
  1095.           fixed.
  1096.           
  1097.           3) Disk reset added before retry on all errors.
  1098.           
  1099.           4) Absolute limit on number of files and directories on device
  1100.           removed.
  1101.           
  1102.           5) Total sector or cluster count shown on screen by HDTEST during
  1103.           testing along with current sector or cluster number.
  1104.           
  1105.           6) /A option for full functionality on ATs and AT clones added.
  1106.           
  1107.           7) /B option to include the boot/partition sector in the DOS area for
  1108.           the purposes of read/write testing added to HDTEST. This sector was
  1109.           previously tested with the DOS area.
  1110.           
  1111.           
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.           
  1130.           
  1131.                                          Page 18                                
  1132.           
  1133.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1134.           
  1135.           
  1136.           Version 2.73          ____________
  1137.           
  1138.           1) Bug (in V2.60) which could cause bad termination of HDTEST and
  1139.           possible subdirectory inconsistencies if a sector which was not in use
  1140.           was found to be bad, fixed.
  1141.           
  1142.           2) Bug (in V2.70) which caused HDTEST to enter a terminal input loop
  1143.           if ANSI.SYS was not loaded and <Esc> was entered to abort it, fixed.
  1144.           
  1145.           3) Minor bug in V2.60 (which resulted in a failed directory scan if
  1146.           HDCHEK was run on a write-protected device) fixed.
  1147.           
  1148.           4) Internal changes made to avoid interference with expanded memory
  1149.           device handlers.
  1150.           
  1151.           5) Ability to update disk after HDTEST terminated by user (typing
  1152.           <Esc>) added.
  1153.           
  1154.           6) /S option to start checking occupied clusters at a given cluster
  1155.           number added to HDTEST.
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.           
  1194.           
  1195.                                          Page 19                                
  1196.           
  1197.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1198.           
  1199.           
  1200.           
  1201.                            APPENDIX A - SUMMARY OF FLAG SETTINGS                           _____________________________________
  1202.           
  1203.           /A(T) - used to tell the HD program that it is being run on an AT or
  1204.           AT-clone (HDCHEK and HDTEST). /A is not quite equivalent to /HF000.
  1205.           
  1206.           /B(oot/Partition sector test) - used to include the hard disk
  1207.           boot/partition sector in the DOS area for the purposes of read/write
  1208.           testing (HDTEST only).
  1209.           
  1210.           /C(lone BIOS)n - used in systems which do not support the IBM BIOS's
  1211.           INT 11 "equipment determination" BIOS function (e.g. the Tandy 2000).
  1212.           The parameter ("n") is the number of floppy drives attached to the
  1213.           system, which is otherwise determined automatically.
  1214.           
  1215.           /D(OS interrupts) forces the program to use only DOS interrupts
  1216.           (INT 25 and INT 26) for access to the target device. May not be
  1217.           combined with the /I flag (HDCHEK and HDTEST).
  1218.           
  1219.           /F(ast mode) limits read/write testing to the use of two patterns
  1220.           only (HDTEST only).
  1221.           
  1222.           /H(ex BIOS address)nnnn - used to tell the HD programs that the ROM
  1223.           BIOS of the device being tested is located at nnnn, which is
  1224.           interpreted as a Hexadecimal segment address, rather than at C800,
  1225.           which is the default.
  1226.           
  1227.           /I(nterrupt 13) - forces the program to use the existing INT 13
  1228.           vector.  This is the default under DOS 2.x. May not be combined with
  1229.           the /D flag (HDCHEK and HDTEST).
  1230.           
  1231.           /N(o Query) - disables the individual prompts for confirmation which
  1232.           the program normally issues before remapping "special" clusters - does
  1233.           not prevent the program from prompting for confirmation before          ___                                                           
  1234.           updating the disk (HDTEST only).
  1235.           
  1236.           /P(rint) - causes the log file to be directed to the PRN device
  1237.           (HDTEST only).
  1238.           
  1239.           /Rn - causes HDTEST to perform n complete testing cycles (or to
  1240.           continue until interrupted for n=0) (HDTEST only).
  1241.           
  1242.           /Snnnnn - causes HDTEST to start testing occupied clusters at cluster                                                   ________                    
  1243.           number nnnnn (expressed as a decimal number) (HDTEST only).
  1244.           
  1245.           /Zn - controls remapping of unreadable sectors in bad clusters (HDTEST
  1246.           only). n may have one of the following values:
  1247.               0 - Remap clusters with unreadable sectors to all NULLs
  1248.               1 (default) - Remap only unreadable sectors to NULLs
  1249.               2 - Transfer all data read to new cluster
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.           
  1258.           
  1259.                                          Page 20                                
  1260.           
  1261.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1262.           
  1263.           
  1264.           
  1265.                              APPENDIX B - DISK ERROR MESSAGES                             ________________________________
  1266.           
  1267.           Users of earlier versions of this software have repeatedly requested
  1268.           that I provide a more detailed explanation of the significance of some
  1269.           of the error messages displayed by HDTEST when it encounters a bad
  1270.           sector or cluster on the disk. It is not possible to do this without
  1271.           assuming (or imparting) a more detailed understanding of the "nitty-
  1272.           gritty" details of data storage on hard and floppy disks than most
  1273.           people want or need, let alone possess. This Appendix is not,
  1274.           therefore, "required reading" for the safe or effective use of the HD
  1275.           programs. It is intended as a tutorial for those who would like to
  1276.           understand something more of what is really going on on their hard or                                               ______                          
  1277.           floppy disk drive when the little red light comes on.
  1278.           
  1279.           For the purposes of what follows, it is (fortunately) not necessary to
  1280.           know or understand exactly how changes in magnetic flux on the surface
  1281.           of a hard (or floppy) disk are translated into binary data, or vice
  1282.           versa. That could be the subject of another long dissertation. I will
  1283.           simply take for granted that binary data, conceptually organised into
  1284.           8-bit bytes, can be read and written by the disk drive hardware under
  1285.           the command of its controller (which usually resides on a separate
  1286.           card plugged into one of the computer's expansion slots). I will be
  1287.           describing how blocks of data are physically arranged on a disk and
  1288.           how the disk controller goes about ensuring that the data it reads has
  1289.           not been corrupted since it was written.
  1290.           
  1291.           I propose to start off by running over some of the error-detection and
  1292.           error-correction techniques and procedures that are applied to data
  1293.           stored on magnetic media. These techniques and procedures are
  1294.           necessary because, although magnetic media are very reliable and the
  1295.           technology of recording and playback is well understood, there always
  1296.           remains the possibility that a defect in the medium or some other
  1297.           intercurrent problem may cause the sequence of bytes read back from a
  1298.           disk or tape to be something other than a perfect duplicate of the
  1299.           sequence that was stored. If a single copy of the raw data were all
  1300.           that were recorded, there would be no way of immediately detecting
  1301.           (let alone correcting) such an error. It might be brought to light
  1302.           when the file that was changed caused problems when it is used by or
  1303.           executed as a program, but it might not become apparent until it had
  1304.           propagated itself through and caused problems or errors in multiple
  1305.           other programs or files. This would clearly be an unacceptable state
  1306.           of affairs. In order to prevent this from occurring, then, there
  1307.           should be some means of checking data which is read in from storage
  1308.           for errors, and/or (preferably) of correcting any errors which may
  1309.           have occurred before any use is made of the data.                        ______                             
  1310.           
  1311.           Although error checking and/or correction can (and sometimes does)
  1312.           take place at any level from that of the application program down to
  1313.           that of the device controller, I am only going to describe the means
  1314.           that are used by hard and floppy disk controllers. When a block of
  1315.           data is passed to the controller to be written to the disk, a series
  1316.           of arithmetical operations is performed in sequence on all the bytes
  1317.           in the block, to produce a 2-byte (for diskettes) or multi-byte (for
  1318.           hard drives) code. The diskette controller implements what is known as
  1319.           a cyclic redundancy check (CRC) algorithm, which is optimized to allow
  1320.           detection of all single bit errors and many longer error bursts (it is          _________                                                             
  1321.           
  1322.           
  1323.                                          Page 21                                
  1324.           
  1325.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1326.           
  1327.           
  1328.           reasonable to assume that errors will most probably either affect a
  1329.           single bit at random or, if they result from media defects, a number
  1330.           of adjacent bits). The longer (at least 32-bit) error correcting code
  1331.           (ECC) calculated by a hard disk controller gives enough information to
  1332.           allow detection and correction of, at least, all single bit errors and                          ______________                                        
  1333.           detection of most likely longer error bursts. The CRC or ECC is saved
  1334.           on disk with the data and is read back in by the controller when the
  1335.           data is read. The controller then compares the saved CRC or ECC with
  1336.           one newly calculated from the data. If the two are identical, the data
  1337.           is assumed to be valid and a successful read is signalled. If there is
  1338.           a discrepancy, a diskette controller always returns the data with a
  1339.           "CRC error", since the CRC code does not contain enough information to
  1340.           allow the incorrect bit or bits to be identified. On a hard disk, if
  1341.           the ECC comparison suggests a correctable error, it will be corrected,
  1342.           and the read call will return with a "Corrected ECC Error" code but
  1343.           with (presumably) valid data in the transfer buffer. If a more
  1344.           extensive error is detected, on the other hand, the call returns with
  1345.           a "Uncorrectable ECC Error" code (which is the same as the CRC error
  1346.           code).
  1347.           
  1348.           The 32-bit ECC used by IBM and many compatible disk manufacturers
  1349.           allows correction of single-bit errors only. Manufacturers of other,                                                 ____                         
  1350.           usually more expensive, controllers use longer and more complex ECCs,
  1351.           to allow the correction of some multi-bit errors, but the necessity to
  1352.           minimise the time taken to calculate the ECC (which is part of "access
  1353.           time") sets tight limits on how complex it can be. ECC error
  1354.           correction is unfortunately not infallible. It is possible for a                                      ___                                 
  1355.           complex, uncorrectable error to result in the same ECC disparity as a                   __                                                          
  1356.           different, correctable, error, so that invalid "corrected" data can be                                                                          ______
  1357.           returned. The longer and more complex the ECC, the less likely this
  1358.           becomes, but there is no way of completely avoiding this ambiguity,
  1359.           short of keeping multiple copies of the data on the disk. In addition,
  1360.           some hard disk controllers* apparently abort with the "corrected ECC
  1361.           error" code immediately on encountering a sector containing such an                      ___________                                            
  1362.           error, even if it is not the last sector in the block specified by a                               ___                                            
  1363.           (multi-sector) read request. This non-intuitive (to say the least of
  1364.           it) behavior can combine with DOS 3.x's habit of ignoring corrected                                                           ________          
  1365.           ECC errors to result in apparently inexplicable disk-related problems,
  1366.           up to and including system crashes (if the file in which the problem
  1367.           occurred contained executable code). This hardware deficiency may be
  1368.           related to the problems which have plagued users of DOS 3.3 on some
  1369.           (previously) apparently IBM-compatible non-IBM hardware, since these
  1370.           also appear to result from deficiencies in the clones' handling of
  1371.           multi-sector disk reads. Prior to V4.36, HDTEST did retry corrected                                                          ___                
  1372.           ECC errors which were reported on the first read of a cluster, but
  1373.           would eventually (if the corrected error persisted) accept the data
  1374.           read as valid and copy and remap it to a "good" cluster. This could
  1375.           cause trouble if the controller had the "immediate abort on corrected
  1376.           ECC error" problem described above and the ECC error were not in the                                             ___                              
  1377.           last sector of the cluster, since the sectors after the "bad" one
  1378.           would not actually have been read, and would be lost (actually
  1379.           replaced by the corresponding sectors from the previous cluster read)                                                         ________              
  1380.           
  1381.           _____________________________________________________________________
  1382.           
  1383.           * This behavior is known to occur with some early Western Digital
  1384.           controllers (1002A-WX1, 1002S-WX2) but it may also occur with others.
  1385.           
  1386.           
  1387.                                          Page 22                                
  1388.           
  1389.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1390.           
  1391.           
  1392.           after remapping. On a machine with this problem, DOS would not, of
  1393.           course, have done any better than the earlier versions of HDTEST at
  1394.           reading the bad cluster, and HDTEST at least warned you that there was
  1395.           a problem, but the behavior described was certainly not ideal. From
  1396.           V4.36, HDTEST rereads clusters in which a persistent corrected ECC
  1397.           error is reported on the initial read sector by sector, to ensure that                                                ________________                
  1398.           all the data in the cluster is transferred when it is remapped. In          ___                                                               
  1399.           most cases (as long as the ECC error was really correctable), this                                                   ______                   
  1400.           will save the cluster (and the file of which it is a part) intact.
  1401.           
  1402.           DOS allows the programmer and/or computer user to think of and deal
  1403.           with disk data in terms of files, lines, and/or records, but data is
  1404.           always moved between a disk and memory a sector at a time. Any disk
  1405.           read or write request passed to DOS eventually gets translated into a
  1406.           command to read or write one or more sectors on the disk, commencing
  1407.           at a specified head, track, and sector. A floppy disk may have either
  1408.           one or two usable surfaces, corresponding to the top and bottom of the                            ________                                            
  1409.           disk. A hard disk usually has at least two surfaces, and may have
  1410.           more, since multiple physical "platters" are frequently incorporated
  1411.           in a single device. Each surface is normally accessed by and
  1412.           corresponds to a single read/write head, which moves radially across                                             ____                             
  1413.           it, although one surface on newer disks is often reserved for "servo"
  1414.           tracks, which are written with a special pattern that allows the
  1415.           controller to ensure that the read/write heads are kept exactly
  1416.           aligned with the data tracks. For a single device, the (data) heads
  1417.           are, by convention, numbered sequentially from zero up to one less
  1418.           than the total number present. Each surface is further divided into a
  1419.           number of circumferential tracks (or cylinders) and each track is                                    ______     _________                   
  1420.           divided into a number of sectors. By convention, the tracks on each                                   _______                                   
  1421.           surface are also numbered sequentially from zero, with track zero
  1422.           being the outermost track. The sectors on each track are normally
  1423.           numbered from one to a number corresponding to the total number of                        ___                                                 
  1424.           sectors on the track, but adjacent sectors do not normally have                                                        ___              
  1425.           consecutive sector numbers. A typical arrangement of the seventeen
  1426.           sectors on a single track of an XT hard disk, for example, would be as
  1427.           follows: 1,8,15,5,12,2,9,16,6,13,3,10,17,7,14,4,11. This "inter-                                                                    ______
  1428.           leaving" of sectors helps to make multi-sector disk reads and writes          _______                                                             
  1429.           more efficient. The controller requires a finite time to process the
  1430.           data from one sector before it can start reading (or writing) the
  1431.           next. During this time, of course, the disk continues to rotate and
  1432.           one or more of the sectors which physically "follow" the one that was
  1433.           last accessed pass under the read/write head unread. Ideally, the
  1434.           interleave (number of physical sectors separating consecutively
  1435.           numbered sectors) should be such that the next sector is just about to
  1436.           come under the read-write head when the controller is free to deal
  1437.           with it, but, because this time is not exactly predictable, it is
  1438.           better to be ultra-conservative (as IBM is) and make it one or two
  1439.           sectors longer than necessary than to be too optimistic. Too small an
  1440.           interleave value is very undesirable, because it results in the                              ____                                       
  1441.           controller having to wait almost a complete disk rotation time for
  1442.           each sector it misses to come round again.
  1443.           
  1444.           At the beginning of each disk sector is an address mark, a short,                                                     ____________          
  1445.           recognizable (to the controller) bit sequence containing the track and
  1446.           sector number. The process of writing the address marks for each
  1447.           sector on a disk is known as "low-level" or "sector" formatting. The
  1448.           DOS FORMAT program does this when it is run on floppy disks, but on
  1449.           
  1450.           
  1451.                                          Page 23                                
  1452.           
  1453.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1454.           
  1455.           
  1456.           hard disks the DOS program merely makes sure that all required address
  1457.           marks are present - they are created by the disk manufacturer or
  1458.           supplier's low-level format program, which may or may not be available
  1459.           to the end user. After each address mark there follows a short gap (to
  1460.           allow the controller time to recognise and respond to the address
  1461.           mark), then the raw data, then the CRC or ECC data. A sector normally
  1462.           contains 512 bytes of raw data, but DOS (and HDTEST) can recognise and
  1463.           deal appropriately with devices with non-standard sector sizes.
  1464.           
  1465.           When a sector read/write command is passed to the disk controller, it
  1466.           (the controller) causes the disk's read/write head to move (seek) to                                                                      ____    
  1467.           the specified track, waits a few milliseconds for it to settle down,
  1468.           and then starts to "pay attention to" the data passing underneath it.
  1469.           The controller locates and reads the address marks to confirm that the
  1470.           read/write head is positioned at the correct track and to identify
  1471.           each sector. If data is being read from the disk, the raw data and
  1472.           recorded CRC or ECC from the requested sector(s) are transferred into
  1473.           the disk controller's internal buffers and (assuming that no errors
  1474.           are detected), thence to main memory. If data is being written, the
  1475.           controller derives the error-checking data from the raw data and
  1476.           writes both to the disk. Some of this process is under the direct
  1477.           control of the controller hardware, but it is supervised by the
  1478.           device's ROM BIOS, which is responsible for error-reporting. Errors
  1479.           can occur at almost any stage of the read/write process, but (if the
  1480.           disk is working at all) usually result from media defects or problems
  1481.           developing in the mechanical components of the hard disk drive. Media
  1482.           defects, once present, are generally constant in size and position
  1483.           (although jarring a disk while it is being written to may sometimes
  1484.           generate a temporary bad sector).                     _________             
  1485.           
  1486.           When HDTEST detects an error during read/write testing of a sector or
  1487.           cluster which has not previously been marked as bad, a (normally)
  1488.           four-line error message is printed, either to the screen (by default),
  1489.           to the printer (/P option), or to the logging file (if an output
  1490.           device was specified). The first line of the message simply indicates
  1491.           the sector or cluster number at which the error occurred. The second
  1492.           line indicates what sort of error was detected and during what phase
  1493.           of read/write testing it occurred. The third line indicates whether
  1494.           HDTEST was able to recover and/or remap the data from the bad sector
  1495.           or cluster, and the fourth indicates either the file which a bad
  1496.           cluster formed part of or that the cluster was not in use. If it was
  1497.           not possible to read one or more sectors from a cluster which
  1498.           contained data (unrecoverable read error), a further two-line message
  1499.           is printed which notes how many sectors were unreadable and how the                                          _______                            
  1500.           data from the bad cluster has been remapped (which depends on whether
  1501.           a /Zn option was specified on the command line).
  1502.           
  1503.           When the program detects an error during read/write testing of a
  1504.           sector in the DOS area, only the first three lines described above are
  1505.           printed. The remainder of this Appendix contains more details of and
  1506.           further information on the possible contents of lines two and three of
  1507.           HDTEST's disk error message.
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.           
  1514.           
  1515.                                          Page 24                                
  1516.           
  1517.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1518.           
  1519.           
  1520.           
  1521.           The second line of the disk read/write error message will usually take
  1522.           the form: "[Error Type] occurred during [phase of testing]". Possible
  1523.           values for [Error Type] are as follows (in alphabetical order):
  1524.           
  1525.           Address Mark Not Found - this is a fairly common error reported for
  1526.           bad blocks which are present from "scratch" on a new disk, since a
  1527.           significant media defect may well not retain sector formatting data
  1528.           and/or the manufacturer may have made sure that a known bad track on
  1529.           the disk will not be used by deliberately not writing address marks
  1530.           there. If new bad clusters are reported with this error message, it is
  1531.           likely that the hard disk surface has been physically damaged (perhaps
  1532.           by a shock to the drive) but possible that the controller has a
  1533.           problem.
  1534.           
  1535.           Bad Controller - this means what it says, but check that all boards
  1536.           and cables are properly seated before giving up.
  1537.           
  1538.           Bad Sector - the BIOS was instructed to read a sector number which (it
  1539.           believes) does not exist on the device. This indicates either an
  1540.           internal program error or that the program is having a problem
  1541.           determining the physical layout of the disk. Check the values reported
  1542.           by HDCHEK against those in the disk documentation.
  1543.           
  1544.           Bad Track - analogous to "Bad Sector".
  1545.           
  1546.           Buffer Comparison - the data read from a sector differs from that
  1547.           written to it. This should not happen, since it suggests either that
  1548.           the device's error-detection functionality has failed or that it has
  1549.           been overwhelmed. If it does occur, the most likely causes are
  1550.           controller and memory problems (in that order of likelihood).
  1551.           
  1552.           Corrected ECC - as discussed at some length above, the data retrieved
  1553.           from a hard disk was incorrect but the device's error-correction
  1554.           hardware was (probably) able to correct it.
  1555.           
  1556.           DMA Boundary Violation - should not occur (HDTEST positions its
  1557.           buffers to avoid crossing absolute segment boundaries). Suggests
  1558.           either an internal program error or controller/BIOS problem.
  1559.           
  1560.           Hardware Timeout - a seek or other operation was not completed within
  1561.           the maximum time allowed by the BIOS. Check connections, reseat
  1562.           boards, otherwise suspect the mechanics of the disk.
  1563.           
  1564.           Init Fail - should not occur (on a working disk).
  1565.           
  1566.           Internal - internal program error. Make sure that your working copy of
  1567.           HDTEST has not been corrupted. The disk is probably not defective.
  1568.           
  1569.           Invalid Command - should not occur. Treat as Internal Error.
  1570.           
  1571.           Multiple Errors - one or more additional errors occurred while HDTEST
  1572.           was attempting to recover from an initial one. Multiple phase report
  1573.           lines will be printed but the error types cannot be further specified.
  1574.           
  1575.           Recovered - HDTEST recovered from the error and did not report on the
  1576.           error type (should not occur).
  1577.           
  1578.           
  1579.                                          Page 25                                
  1580.           
  1581.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1582.           
  1583.           
  1584.           
  1585.           Reset Fail - The device could not be reset (after an error). Usually
  1586.           indicates major problems with the disk or controller, but check
  1587.           connections, etc.
  1588.           
  1589.           Sector Not Found - the requested sector's address mark was not found.
  1590.           Likely to result from a media defect.
  1591.           
  1592.           Seek Fail - after a seek to a track, the controller found that the
  1593.           read/write head was not positioned correctly. Usually indicates a
  1594.           significant problem with the (drive) hardware.
  1595.           
  1596.           Sense Fail - the controller cannot find the drive! Check connections,
  1597.           etc.
  1598.           
  1599.           Uncorrected ECC - data error too major to be corrected. Usually a
  1600.           media defect. This message will also be produced if a CRC error is
  1601.           detected on a floppy disk.
  1602.           
  1603.           Undefined - the BIOS cannot figure out what went wrong, but something
  1604.           did!
  1605.           
  1606.           Unknown - likewise!
  1607.           
  1608.           Write Protection - HDTEST is attempting to write to a write-protected
  1609.           device.
  1610.           
  1611.           
  1612.           Possible forms for the rest of the second line are as follows:
  1613.           
  1614.           ... Error (unrecovered) occurred during first read - the cluster could
  1615.           not be read without error in five tries before a seek to the other
  1616.           "end" of the disk.
  1617.           
  1618.           ... Error occurred during first read - the error occurred during the
  1619.           first read but was recovered after one or more retries.
  1620.           
  1621.           ... Error occurred during read after seek - the error occurred when
  1622.           the cluster was read after a seek away.
  1623.           
  1624.           ... Error occurred during pattern read/writes - the error occurred
  1625.           during the pattern read/write phase of testing.
  1626.           
  1627.           ... Error occurred during final write - the error occurred when the
  1628.           saved copy of the cluster was being restored to the disk.
  1629.           
  1630.           ... Error occurred during read after final write - the error occurred
  1631.           when the restored cluster was being read back.
  1632.           
  1633.           ... (Buffer comparison) error occurred after final read - the copy of
  1634.           the cluster read back after restoration to the disk differed from its
  1635.           original memory image.
  1636.           
  1637.  
  1638.  
  1639.  
  1640.  
  1641.           
  1642.           
  1643.                                          Page 26                                
  1644.           
  1645.           Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher          _______________________________        _______________________________
  1646.           
  1647.           
  1648.           
  1649.           There are only three basic forms of the third line:
  1650.           
  1651.           This error is (or "These errors are") recoverable (no data loss has
  1652.           occurred). - the bad cluster was read successfully and has been
  1653.           successfully restored to its original form, but it remains suspect and
  1654.           will (with your permission) be remapped.
  1655.           
  1656.           This error is unrecoverable, but remapping is possible. - the bad
  1657.           cluster was read successfully but has not been restored to its                                                ___                     
  1658.           original form. Remapping should be successful, but the data will be
  1659.           lost if this is not permitted.
  1660.           
  1661.           This error is unrecoverable, and data may be lost! - the bad cluster
  1662.           was not read successfully and will be remapped as provided by the
  1663.           value of the /Z switch parameter if remapping is permitted. In any
  1664.           event, some data loss has almost certainly occurred.
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.           
  1706.           
  1707.                                          Page 27                                
  1708.      
  1709.      Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher     _______________________________        _______________________________
  1710.      
  1711.      
  1712.  
  1713.                    APPENDIX C - EXAMPLE PROGRAM RUNS                   _________________________________
  1714.  
  1715.      Screen display from successful run of HDCHEK on partition occupying the
  1716.      whole of a 20 Mb hard disk:
  1717.  
  1718. Device C: appears to be the DOS partition of a hard disk
  1719. It contains 41531 sectors
  1720. It starts at absolute sector 17 on the disk      {THIS IS CORRECT}                                                  _______________ 
  1721. The total partition size is approximately 20 Mb
  1722. There are 4 heads and 17 sectors/track
  1723. Sector size is 512 bytes
  1724. Each of the 2 (16 bit) FATs occupies 41 sectors
  1725. The Root Directory occupies 32 sectors
  1726. The data area starts at DOS sector 115, and contains 10354 clusters, each
  1727. consisting of 4 sectors
  1728. The directory scan was successful; a total of 1260 files and subdirectories
  1729. was found.
  1730.  
  1731.  
  1732.  
  1733.      Screen display from successful run of HDCHEK on a freshly FORMATted DSDD
  1734.      9-sector floppy disk:
  1735.  
  1736. Device A: is not a hard disk - using DOS interrupts
  1737.  
  1738.  
  1739. Device A: is a floppy disk
  1740. The disk contains 720 sectors
  1741. There are 2 heads and 9 sectors/track
  1742. Sector size is 512 bytes
  1743. Each of the 2 (12 bit) FATs occupies 2 sectors
  1744. The Root Directory occupies 7 sectors
  1745. The data area starts at DOS sector 12, and contains 354 clusters, each
  1746. consisting of 2 sectors
  1747. The directory scan was successful; a total of 0 files and subdirectories
  1748. was found.
  1749.  
  1750.  
  1751.      Screen display from run of HDCHEK on 20 Mb DOS partition - directory
  1752.      structure bad or unrecognizable:
  1753.  
  1754. Device C: appears to be the DOS partition of a hard disk
  1755. It contains 41531 sectors
  1756. It starts at absolute sector 17 on the disk
  1757. The total partition size is approximately 20 Mb
  1758. There are 4 heads and 17 sectors/track
  1759. Sector size is 512 bytes
  1760. Each of the 2 (16 bit) FATs occupies 41 sectors
  1761. The Root Directory occupies 32 sectors
  1762. The data area starts at DOS sector 115, and contains 10354 clusters, each
  1763. consisting of 4 sectors
  1764. The preliminary directory scan failed.
  1765.  
  1766.  
  1767.  
  1768.  
  1769.      
  1770.      
  1771.                                     Page 28                                
  1772.      
  1773.      Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher     _______________________________        _______________________________
  1774.      
  1775.      
  1776.  
  1777.      Screen display from run of HDCHEK on 20 Mb DOS partition - FATs not
  1778.      identical:
  1779.  
  1780. FATS are different
  1781. FAT discrepancy at byte 20F - FAT 1 has FF; FAT 2 has F8
  1782. Continue comparison (Y/N)? [Y]: n     {user input}                                _                 
  1783.  
  1784. Device C: appears to be the DOS partition of a hard disk
  1785. It contains 41531 sectors
  1786. It starts at absolute sector 17 on the disk
  1787. The total partition size is approximately 20 Mb
  1788. There are 4 heads and 17 sectors/track
  1789. Sector size is 512 bytes
  1790. Each of the 2 (16 bit) FATs occupies 41 sectors
  1791. The Root Directory occupies 32 sectors
  1792. The data area starts at DOS sector 115, and contains 10354 clusters, each
  1793. consisting of 4 sectors
  1794.  
  1795.  
  1796.  
  1797.      Screen display from run of HDCHEK - program unable to deduce disk
  1798.      structure - disk not recognizable as a DOS device:
  1799.  
  1800. Unrecognised media descriptor byte! - see error code
  1801. Error Code = F1      {F1 is not a media descriptor byte used by DOS}
  1802.      
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.      
  1834.      
  1835.                                     Page 29                                
  1836.      
  1837.      Documentation for HDTEST V4.45          Copyright 1988, P. R. Fletcher     _______________________________        _______________________________
  1838.      
  1839.      
  1840.      
  1841.      Log file from successful run of HDTEST on 20 Mb DOS partition:
  1842.      
  1843.      HDTEST Log File - Wed Jan 07 11:44:52 1986
  1844.      Testing Device C:
  1845.      
  1846.      No new bad clusters identified - HDTEST finished.
  1847.      Wed Jan 07 16:10:41 1987
  1848.      
  1849.      
  1850.      Log file from run of HDTEST on 20 Mb DOS partition - one bad cluster
  1851.      detected and remapped:
  1852.      
  1853.      HDTEST Log File - Mon Jan 05 21:09:32 1987
  1854.      Testing Device C:
  1855.      
  1856.      Read/Write error at cluster number 7623!!
  1857.      Corrected ECC error occurred during pattern read/writes
  1858.      This error is recoverable (no data loss has occurred).
  1859.      Bad cluster is in file \MYFILES\DATA5\FFT1234.DAT
  1860.      
  1861.      1 new bad clusters identified, marked, and remapped - HDTEST finished.
  1862.      Tue Jan 06 05:08:04 1987
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.      
  1898.      
  1899.                                     Page 30                                
  1900.      
  1901.      
  1902.                         REGISTRATION FORM - HDTEST V4.45                        ________________________________
  1903.      
  1904.      Please complete this form and return it with a check or money order for
  1905.      $35.00 (+ $5.00 for shipping outside North America) or equivalent to:
  1906.      
  1907.                      Peter R. Fletcher
  1908.                      1515 West Montgomery Avenue
  1909.                      Rosemont
  1910.                      PA 19010
  1911.                      U.S.A.
  1912.      
  1913.      European users should send Registrations to the address on the
  1914.      program's copyright screen.
  1915.      
  1916.      None of the information on this form will be passed on to any other
  1917.      individual or commercial organization.
  1918.      
  1919.      --------------------------------------------------------------------------
  1920.      
  1921.      This information is required to process your Registration:
  1922.      
  1923.      Last Name:____________________________  Other Names:______________________
  1924.      
  1925.      Address:______________________________  Town/City:________________________
  1926.      
  1927.      State:_____________  Post Code:____________  Telephone:_________________
  1928.                                                            (evenings/weekends)
  1929.      
  1930.      I understand that this software is supplied without warranty, express or
  1931.      implied, and agree not to hold its author liable for any direct or
  1932.      consequential loss arising out of my use of it.
  1933.      
  1934.      Signature:______________________________
  1935.      
  1936.      -------------------------------------------------------------------------
  1937.      
  1938.      You are requested, but not required, also to answer the following
  1939.      questions:
  1940.      
  1941.      On What type(s) of computer are you using HDTEST? _________________________
  1942.      
  1943.      CPU (8088, 8086, etc.)? __________   Amount of RAM (kB)? ____________
  1944.      
  1945.      Type & Size of Hard Disk(s)? ____________________________________
  1946.      
  1947.      Make and Type of Hard Disk Controller(s)? ______________________________
  1948.      
  1949.      Do you own a Modem?                                             Y  N
  1950.      
  1951.      Are you a member of BIX?   Y  N        Compuserve?              Y  N
  1952.      
  1953.      How did you obtain/hear about this program?
  1954.      
  1955.      Did you think that the $35.00 registration fee for this program was:
  1956.      
  1957.      Very Good Value?              About Right?             Excessively High?
  1958.      
  1959.      
  1960.      Are there any other utility programs that you would like to see made
  1961.      available as "User Supported Software"? What sort of programs?
  1962.      
  1963.      
  1964.